<!--行名行号交易查询-->
<template>
  <div class="app-container">
        <Ht-search-form
          :defaultEventKey="defaultSearchKey"
          :dictMap="dictMap"
          :queryParams="queryParams"
          :outputQueryParams="queryParams"
          :formOptions="formOptions"
          :advOptions="[]"
          :labelWidth="90"
        ></Ht-search-form>
          <ht-table
            :defaultEventKey="defaultSearchKey"
            ref="dataTable"
            rowKey="bankCode"
            :showSerialNumber="false"
            :multi-select="false"
            :dictMap="dictMap"
            :reqConfig="reqConfig"
            :queryParams="queryParams"
            :tableBindColumns="tableBindColumns"
            :showRightToolbar="true"
          >
            <template v-slot:operate>
              <el-table-column
                label="操作"
                align="center"
                fixed="right"
                width="120"
                class-name="small-padding fixed-width"
              >
                <template slot-scope="scope">
                  <ht-button-group
                    :buttonList="[
                      {
                        label: '明细',
                        doFunc: () => {
                          detail(scope.row);
                        },
                      },
                    ]"
                  />
                </template>
              </el-table-column>
            </template>
          </ht-table>
    <bank-branch-detail ref="detail" :dictMap="dictMap"></bank-branch-detail>
  </div>
</template>
<script>
import { listPageMixin } from "@/libs/listPageMixin";
import DealSearch from "@/views/cnaps/bizMng/batchFile/batchFileQuery/DealSearch";
import Detail from "@/views/cnaps/baseBiz/return/inquire/components/Details";
import BankBranchDetail from "@/views/cnaps/bizMng/cnapsbank/inquery/detail";
import { Cnaps2BankCode } from "@/api/cnaps/common/bankInfo";

export default {
  name: "bankBranchQuery",
  mixins: [listPageMixin],
  components: {
    BankBranchDetail,
    Detail,
    DealSearch
  },
  data() {
    return {
      title: "",
      openState: false,
      defaultSearchKey: "cnapsBankSearch-dialog",
      // 来源标识 为了服用区分是哪个选项触发的
      fromFlag: "",
      dictMap: {},
      tableLoadingState: false,
      formOptions: [],
      searchFormDictList:["PT_TYPE","CNAPSBANK_STATUS","JOIN_BIZ_FLAG"],
      queryParams: {
        bankCode: "",
        orgFullname: "",
      },
      reqConfig: Cnaps2BankCode,
      tableBindColumns: [
        { label: `参与机构行号`, prop: "bankCode" },
        { label: `所属直参行号`, prop: "drctBankCode"},
        { label: `参与机构全称`, prop: "orgFullname"},
      ],
      refName: ''
    };
  },
  computed: {

  },
  created() {
  },
  mounted() {
    this.formOptions = [
      {
        type: "input",
        prop: "bankCode",
        defaultAttr: {
          size: "small",
          label: "参与机构行号",
          placeholder: "请输入参与机构行号",
        },
      },
      {
        type: "input",
        prop: "drctBankCode",
        defaultAttr: {
          size: "small",
          label: "所属直参行号",
          placeholder: "请输入所属直参行号",
        },
      },
      {
        type: "input",
        prop: "orgFullname",
        defaultAttr: {
          size: "small",
          label: "参与机构全称",
          placeholder: "请输入参与机构全称",
        },
      },
    ];
  },
  methods: {
    editComplete(state) {
      console.log("editComplete", state);
      if (state == true) {
        this.getList();
      }
    },

    /** todo 查询当天操作员的交易记录 */
    getList() {
      this.doQuery();
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.dateRange = [];
      this.resetForm("queryForm");
      this.handleQuery();
    },
    /*审核明细*/
    detail(row) {
      this.$refs.detail.show(row);
    },
  },
};
</script>
<style>
.label-header-msg {
  font-weight: bold;
}
</style>
